<template>
	<view class="flex-col justify-start relative page">
		<view class=""
			style="position: fixed;top: 0;left: 0;right: 0;z-index: 99;background-color: #fdeffc;height: 340rpx;">
			<!-- <view class="section"></view> -->
			<view class="flex-row items-center section_2 pos">
				<view class="uni-searchbar">
					<!-- :style="{backgroundColor: bgColor}" -->
					<view class="uni-searchbar__box" @click="searchClick">
						<view class="uni-searchbar__box-icon-search">
							<slot name="searchIcon">
								<uni-icons color="#837487" size="20" type="search" />
							</slot>
						</view>
						<input v-if="show || searchVal" :focus="showSync" :disabled="readonly" placeholder="搜索"
							class="uni-searchbar__box-search-input" confirm-type="search" type="text"
							v-model="searchVal" @confirm="confirm" @blur="blur" @focus="emitFocus" />
						<text v-else class="uni-searchbar__text-placeholder">搜索</text>
						<view v-if="show && (clearButton==='always'||clearButton==='auto'&&searchVal!=='') &&!readonly"
							class="uni-searchbar__box-icon-clear" @click="clear">
							<slot name="clearIcon">
								<uni-icons color="#c0c4cc" size="20" type="clear" />
							</slot>
						</view>
					</view>

					<!-- 		<text @click="cancel" class="uni-searchbar__cancel"
			v-if="cancelButton ==='always' || show && cancelButton ==='auto'">{{cancelTextI18n}}</text> -->
				</view>

			</view>



			<view class="flex-row justify-evenly section_3 pos_2">
				<text class="font_2 text_2">默认排序</text>
				<image class="image_2" src="/static/assets3/010a5a9c7eeb7b2c47a0de3711c64dcc.png" />
			</view>
			<view class="flex-row justify-evenly section_4 pos_3">
				<text class="font_2 text_3">男女</text>
				<image class="image_2" src="/static/assets3/010a5a9c7eeb7b2c47a0de3711c64dcc.png" />
			</view>
			<view class="flex-col justify-start items-center text-wrapper pos_4 " :class=" xsdoubel == 0?'':'aius' "
				@click="sebw(0)">
				<text class="font_3 text_4 " :class=" xsdoubel == 0?'':'vjhs' ">线上聊天</text>
			</view>
			<view class="flex-col justify-start items-center text-wrapper_2 pos_5 " :class=" xsdoubel == 1?'abus':'' "
				@click="sebw(1)">
				<text class="font_2 text_5" :class=" xsdoubel == 1?'vjhs2':'' ">线下陪玩</text>
			</view>
		</view>
		<view class="grid pos_6">

			<view class="kjons" v-for="(item,index) in 3"  @click="doledtsl" >
				<image class="biewb" src="/static/acti/2.webp" mode=""></image>
				<view class="flex-col grid-item nhoud ">

					<view class="flex-col justify-start items-center self-start text-wrapper_3">
						<text class="font_4 text_6">空闲</text>
					</view>

					<!-- 	<view class="flex-col justify-start items-center self-start text-wrapper_1">
				  <text class="font_4 text_1">忙碌</text>
				</view>
				<view class="flex-col justify-start items-center self-start text-wrapper_6">
				  <text class="font_4 text_13">休息</text>
				</view> -->


					<view class="flex-col self-stretch section_5 mt-116">
						<view class="flex-row items-center self-stretch">
							<text class="font text_8">Lancy</text>
							<view class="flex-row items-center section_6 ml-6">
								<image class="shrink-0 image_3"
									src="/static/assets3/9ff611b19f94969c78319f4e39393cdb.png" />
								<text class="font_5 text_9 ml-3">22</text>
							</view>
						</view>
						<text class="self-start font_4 text_11 mt-6">美国</text>
						<view class="flex-row self-stretch mt-6">
							<image class="image_4" src="/static/assets3/be790e922da71bc2e8554417611ccc73.png" />
							<image class="image_5 ml-5" src="/static/assets3/1755344d7f784fd7fa7731f0262b290d.png" />
							<image class="image_5 ml-5" src="/static/assets3/5476e365e15f25eba0b791d33c685d83.png" />
						</view>
						<view class="flex-row justify-between items-center self-stretch mt-6">
							<view class="flex-row items-center">
								<image class="shrink-0 image_5"
									src="/static/assets3/49f44bce40ee3f93030649e5b11999a9.png" />
								<text class="font_5 ml-6">1234.1km</text>
							</view>
							<view class="flex-col justify-start items-center text-wrapper_5"><text
									class="font_3">预约</text></view>
						</view>
					</view>
				</view>
			</view>






		</view>




		<view class="footer">
			<view class="mainbotm">
				<view class="onehome oenmy" @click="goabbar(0)">
					<image src="/static/datab/00.png" mode=""></image>
					<!-- 	<view class="teben">
						聊天
					</view> -->
				</view>
				<view class="onehome oenmy" @click="goabbar(1)">
					<image src="/static/datab/1.png" mode=""></image>
					<!-- 	<view class="teben">
						首页
					</view> -->
				</view>
				<view class="onehome acti " @click="goabbar(2)">
					<image src="/static/datab/2.png" mode=""></image>
					<view class="teben">
						陪玩
					</view>
				</view>
				<view class="onehome  oenmy" @click="goabbar(3)">
					<image src="/static/datab/4.png" mode=""></image>
					<!-- 	<view class="teben">
						我的
					</view> -->
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		components: {},
		props: {},
		data() {
			return {
				xsdoubel: 1, //聊天，陪玩
				xsdaine: ['线上聊天', '线下陪玩'],
				show: false,
				showSync: false,
				searchVal: '',
				clearButton: 'auto',
				cancelButton: 'auto',
				placeholder: '',
				readonly: false
			}
		},
		// computed: {
		// 	cancelTextI18n() {
		// 		return this.cancelText || t("uni-search-bar.cancel")
		// 	},
		// 	placeholderText() {
		// 		return this.placeholder || t("uni-search-bar.placeholder")
		// 	}
		// },
		watch: {
			// #ifndef VUE3
			value: {
				immediate: true,
				handler(newVal) {
					this.searchVal = newVal
					if (newVal) {
						this.show = true
					}
				}
			},
			// #endif
			// #ifdef VUE3
			modelValue: {
				immediate: true,
				handler(newVal) {
					this.searchVal = newVal
					if (newVal) {
						this.show = true
					}
				}
			},
			// #endif
			focus: {
				immediate: true,
				handler(newVal) {
					if (newVal) {
						if (this.readonly) return
						this.show = true;
						this.$nextTick(() => {
							this.showSync = true
						})
					}
				}
			},
			searchVal(newVal, oldVal) {
				this.$emit("input", newVal)
				// #ifdef VUE3
				this.$emit("update:modelValue", newVal)
				// #endif
			}
		},


		methods: {
			// 去详情
			doledtsl(){
				uni.navigateTo({
					url:'/pages/play/detail'
				})
			},
			sebw(i) {
				this.xsdoubel = i
			},
			searchClick() {
				if (this.readonly) return
				if (this.show) {
					return
				}
				this.show = true;
				this.$nextTick(() => {
					this.showSync = true
				})
			},
			clear() {
				this.$emit("clear", {
					value: this.searchVal
				})
				this.searchVal = ""
			},
			cancel() {
				if (this.readonly) return
				this.$emit("cancel", {
					value: this.searchVal
				});
				this.searchVal = ""
				this.show = false
				this.showSync = false
				// #ifndef APP-PLUS
				uni.hideKeyboard()
				// #endif
				// #ifdef APP-PLUS
				plus.key.hideSoftKeybord()
				// #endif
			},
			confirm() {
				// #ifndef APP-PLUS
				uni.hideKeyboard();
				// #endif
				// #ifdef APP-PLUS
				plus.key.hideSoftKeybord()
				// #endif
				this.$emit("confirm", {
					value: this.searchVal
				})
			},
			blur() {
				// #ifndef APP-PLUS
				uni.hideKeyboard();
				// #endif
				// #ifdef APP-PLUS
				plus.key.hideSoftKeybord()
				// #endif
				this.$emit("blur", {
					value: this.searchVal
				})
			},
			emitFocus(e) {
				this.$emit("focus", e.detail)
			},


			goabbar(i) {
				switch (i) {
					case 0:
						uni.switchTab({
							url: '/pages/chat/chat'
						})
						break;
					case 1:
						uni.navigateTo({
							url: '/pages/newtreds/index'
						})
						// uni.switchTab({
						// 	url: '/pages/friend/friend'
						// })
						break;
					case 2:
						uni.navigateTo({
							url: '/pages/play/index'
						})
						break;
					case 3:
						uni.switchTab({
							url: '/pages/mine/mine'
						})

						break;

				}
			},

		},
	};
</script>



<style lang="scss">
	.abus {
		background-color: #fb75d6 !important;
	}

	.vjhs2 {
		font-size: 32rpx;
		color: #fff !important;
	}

	.vjhs {
		font-size: 32rpx;
		color: #2A222F !important;
	}

	.aius {
		background-color: #fff !important;


	}

	$uni-searchbar-height: 36px;

	.uni-searchbar {
		width: 100%;

		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		position: relative;
		padding: 10px;
		// background-color: #fff;

	}

	.uni-searchbar__box {
		width: 100%;
		border: 1px solid #EDE5ED;
		/* #ifndef APP-NVUE */
		display: flex;
		box-sizing: border-box;
		/* #endif */
		overflow: hidden;
		position: relative;
		flex: 1;
		justify-content: center;
		flex-direction: row;
		align-items: center;
		height: 90rpx;
		border-radius: 24rpx;
		padding: 15rpx 8px 15rpx 0px;
		background-color: #fff8fb;
	}

	.uni-searchbar__box-icon-search {
		// border: 1px solid rgba(237, 229, 237, 1);

		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		// width: 32px;
		padding: 0 8px;
		justify-content: center;
		align-items: center;
		color: #B3B3B3;
	}

	.uni-searchbar__box-search-input {
		flex: 1;
		font-size: 14px;
		color: #333;
	}

	.uni-searchbar__box-icon-clear {
		align-items: center;
		line-height: 24px;
		padding-left: 8px;
		/* #ifdef H5 */
		cursor: pointer;
		/* #endif */
	}

	.uni-searchbar__text-placeholder {
		font-size: 14px;
		color: #B3B3B3;
		margin-left: 5px;
	}

	.uni-searchbar__cancel {
		padding-left: 10px;
		line-height: $uni-searchbar-height;
		font-size: 14px;
		color: #333333;
		/* #ifdef H5 */
		cursor: pointer;
		/* #endif */
	}
</style>


<style scoped lang="scss">
	.nav-bar {
		margin-top: 14rpx;
		padding: 2rpx 0;
		display: flex;
		align-items: center;
		// background-color: white;

		height: 110rpx;

		.nav-search {
			flex: 1;
			height: 110rpx;
		}


	}

	.onehome {
		display: flex;
		align-items: center;

		image {
			width: 48rpx;
			height: 48rpx;
			vertical-align: middle;
		}

		.teben {
			margin-left: 10rpx;
			color: rgba(251, 117, 214, 1);
			font-size: 28rpx;
			font-weight: bold;
		}
	}

	// 高亮选择
	.acti {
		background: rgba(248, 239, 249, 1);
		height: 75%;
		padding: 0 50rpx;
		border-radius: 100rpx;

	}

	.mainbotm {
		height: 128rpx;
		// margin: 0 40rpx 40rpx;
		padding: 0 30rpx 30rpx;
		background-color: #fff;
		border-radius: 50rpx 50rpx 0 0;
		box-shadow: 0px 6px 16px 0px #21465414;


		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.oenmy {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 140rpx;
		height: 96rpx;
		vertical-align: middle;
		border-radius: 50%;
		// background-color: #f7f8fa;
	}

	.footer {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;

		// background-color: rgba(255, 255, 255, );
		// height: 200rpx;

		backdrop-filter: blur(4rpx);
		background-image: linear-gradient(180deg, rgba(255, 255, 255, .1) -30%, rgba(255, 255, 255, .1) 50%);
		// padding: 20rpx;



		// backdrop-filter: blur(6px);
		//     background-image: linear-gradient(180deg, rgba(255, 255, 255, .5) -30%, rgba(255 ,255, 255, .5) 50%);

	}

	.nhoud {
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
	}

	.kjons {
		position: relative;
	}

	.biewb {

		border-radius: 30rpx;
		width: 100%;
		height: 496rpx;
	}

	.ml-13 {
		margin-left: 26rpx;
	}

	.mt-116 {
		margin-top: 232rpx;
	}

	.ml-3 {
		margin-left: 6rpx;
	}

	.ml-17 {
		margin-left: 34rpx;
	}

	.ml-7 {
		margin-left: 14rpx;
	}

	.ml-5 {
		margin-left: 10rpx;
	}

	page {
		background-color: #fdeffc !important;
	}

	.page {
		// background-color: #ffffff;
		background-image: url('/static/assets3/e9cd3fc4ee4eabc1262262a469ab1c21.png');
		background-size: 100% 100%;
		background-repeat: no-repeat;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100%;

		.section {
			// background-image: url('/static/assets3/e9cd3fc4ee4eabc1262262a469ab1c21.png');
			// background-size: 100% 100%;
			background-repeat: no-repeat;
			width: 750rpx;
			// height: 1624rpx;
		}

		.section_2 {
			// padding: 23rpx 31rpx;
			// background-color: #ffffff66;
			// border-radius: 24rpx;
			// border: solid 2rpx #ece5ec;

			.text {
				color: #c2afc3;
				line-height: 25.7rpx;
				font-weight: unset;
			}
		}

		.pos {
			position: absolute;
			left: 39rpx;
			right: 39rpx;
			top: 95rpx;
		}

		.section_3 {
			padding: 20.3rpx 24rpx 21.48rpx 25.12rpx;
			background-color: #ffffff;
			border-radius: 40rpx;
			width: 176rpx;

			.text_2 {
				line-height: 22.22rpx;
			}
		}

		.pos_2 {
			position: absolute;
			left: 32rpx;
			top: 232rpx;
		}

		.section_4 {
			padding: 20.28rpx 24rpx 21.52rpx 25.54rpx;
			background-color: #ffffff;
			border-radius: 40rpx;
			width: 128rpx;

			.text_3 {
				line-height: 22.2rpx;
			}
		}

		.pos_3 {
			position: absolute;
			left: 224rpx;
			top: 232rpx;
		}

		.font_2 {
			font-size: 24rpx;
			font-family: PingFang SC;
			line-height: 22.24rpx;
			color: #2a222f;
		}

		.image_2 {
			border-radius: 3rpx;
			width: 24rpx;
			height: 20rpx;
		}

		.text-wrapper {
			padding: 20.18rpx 0 21.38rpx;
			background-color: #fb75d6;
			border-radius: 40rpx;
			width: 144rpx;

			.text_4 {
				line-height: 22.44rpx;
			}
		}

		.pos_4 {
			position: absolute;
			right: 192rpx;
			top: 232rpx;
		}

		.text-wrapper_2 {
			padding: 20.24rpx 0 21.56rpx;
			background-color: #ffffff;
			border-radius: 40rpx;
			width: 144rpx;

			.text_5 {
				line-height: 22.2rpx;
			}
		}

		.pos_5 {
			position: absolute;
			right: 32rpx;
			top: 232rpx;
		}

		.text-wrapper_1 {
			margin-left: 16rpx;
			padding: 12.4rpx 0 13.62rpx;
			background-color: #af52de;
			border-radius: 24rpx;
			width: 96rpx;

			.text_1 {
				line-height: 21.98rpx;
			}
		}

		.text-wrapper_6 {
			margin-left: 16rpx;
			padding: 12.24rpx 0 13.6rpx;
			background-color: #837386;
			border-radius: 24rpx;
			width: 96rpx;

			.text_13 {
				line-height: 22.16rpx;
			}
		}

		.grid {
			padding: 0 30rpx;
			background-color: #fdeffc;
			// height: 1304rpx;
			display: grid;
			grid-template-rows: repeat(3, minmax(0, 1fr));
			grid-template-columns: repeat(2, minmax(0, 1fr));
			row-gap: 26rpx;
			column-gap: 26rpx;

			.grid-item {

				// padding-top: 16rpx;
				// border-radius: 32rpx;
				// background-image: url(https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/61cae5fb5a7e3f03106a39ac/67bed1ce4ae84d0012275f8c/17405820304483018677.png);
				// background-size: 100% 100%;
				// background-repeat: no-repeat;
				.text-wrapper_3 {
					margin-left: 16rpx;
					padding: 12.2rpx 0 13.58rpx;
					background-color: #34c759;
					border-radius: 24rpx;
					width: 96rpx;

					.text_6 {
						line-height: 22.22rpx;
					}
				}
			}



			.font_4 {
				font-size: 24rpx;
				font-family: PingFang SC;
				line-height: 22.24rpx;
				color: #ffffff;
			}

			.section_5 {
				padding: 0 24rpx 24rpx;
				background-image: linear-gradient(180deg, #2a222f00 4%, #2a222f 96.5%);
				border-radius: 0rpx 0rpx 32rpx 32rpx;

				.text_8 {
					line-height: 25.54rpx;
				}

				.section_6 {
					padding: 8rpx;
					background-color: #ffffff;
					border-radius: 24rpx;
					height: 40rpx;

					.text_9 {
						color: #fb75d6;
						line-height: 17.48rpx;
					}
				}

				.text_11 {
					line-height: 22.3rpx;
				}

				.image_4 {
					border-radius: 50%;
					width: 28.66rpx;
					height: 28.66rpx;
				}

				.image_5 {
					width: 32rpx;
					height: 32rpx;
				}

				.font_5 {
					font-size: 24rpx;
					font-family: PingFang SC;
					line-height: 17.8rpx;
					color: #ffffff;
				}

				.text-wrapper_5 {
					padding: 12.2rpx 0 13.56rpx;
					background-image: linear-gradient(120.4deg, #fb75d6 53.8%, #b270f0 95.3%);
					border-radius: 32rpx;
					width: 96rpx;
					height: 48rpx;
				}

				.text_10 {
					line-height: 26.34rpx;
				}

				.text_12 {
					line-height: 22.08rpx;
				}

				.text_14 {
					line-height: 20.78rpx;
				}

				.text_15 {
					line-height: 25.92rpx;
				}

				.section_7 {
					padding: 8rpx;
					background-color: #ffffff;
					border-radius: 24rpx;
					width: 74rpx;
					height: 40rpx;
				}

				.image_3 {
					width: 24rpx;
					height: 24rpx;
				}

				.font_6 {
					font-size: 24rpx;
					font-family: PingFang SC;
					line-height: 17.8rpx;
					color: #58a7ff;
				}

				.text_16 {
					margin-left: 8.58rpx;
				}

				.view {
					margin-left: 19.42rpx;
				}
			}



		}

		.pos_6 {
			margin-top: 340rpx;
			// position: absolute;
			// left: 32rpx;
			// right: 30rpx;
			// top: 320rpx;
		}

		.font {
			font-size: 28rpx;
			font-family: PingFang SC;
			line-height: 25.88rpx;
			font-weight: 700;
			color: #ffffff;
		}

		.font_3 {
			font-size: 24rpx;

			line-height: 22.24rpx;

			color: #ffffff;
		}

		.section_10 {
			background-color: #ffffff;
			width: 750rpx;
			height: 68rpx;
		}

		.pos_8 {
			position: absolute;
			left: 0;
			right: 0;
			top: 1556rpx;
		}

		.section_8 {
			padding: 16rpx 86rpx 16rpx 88rpx;
			background-color: #ffffff;
			border-radius: 48rpx 48rpx 0rpx 0rpx;
			box-shadow: 0rpx 2rpx 2rpx #ffffff99 inset;

			.section_9 {
				padding: 24rpx 50.92rpx 24rpx 51rpx;
				background-color: #f7eff8;
				border-radius: 48rpx;
				height: 96rpx;

				.text_19 {
					color: #fb75d6;
				}
			}
		}

		.pos_7 {
			position: absolute;
			left: 0;
			right: 0;
			top: 1428rpx;
		}

		.image {
			width: 48rpx;
			height: 48rpx;
		}
	}
</style>